﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Subtle.ViewModels
{
	/// <summary>
	/// Home Archive View Model
	/// </summary>
	public class HomeArchiveViewModel
	{
		public string Date { get; set; }
		public int PostCount { get; set; }

		/// <summary>
		/// Get Model
		/// </summary>
		/// <param name="archiveItem"></param>
		/// <returns></returns>
		public static HomeArchiveViewModel GetModel(KeyValuePair<DateTime, int> archiveItem)
		{
			HomeArchiveViewModel homeArchiveViewModel = new HomeArchiveViewModel();
			homeArchiveViewModel = AutoMapper.Mapper.Map<KeyValuePair<DateTime, int>, HomeArchiveViewModel>(archiveItem, homeArchiveViewModel);
			return homeArchiveViewModel;
		}
	}
}